#!/bin/bash

#two arguments: host port

if [ $# -ne 2 ]
then
	echo "Usage: host port"
	exit 1
fi

stty -F /dev/ttyACM0 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts

#run the program stdout goes to arduino, stdin comes from arduino
./myserver $1 $2 > /dev/ttyACM0
